package game.controller.items
{
	import game.constants.items.notif.ItemNotification;
	import game.model.items.ItemProxy;
	import game.model.items.vo.ItemVO;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Thot
	 */
	
	public class PushItemCommand extends SimpleCommand
	{
		override public function execute( notification:INotification ):void
		{
			var body:ItemNotification = notification.getBody() as ItemNotification;
			var itemProxy:ItemProxy = facade.retrieveProxy( ItemProxy.NAME ) as ItemProxy;
			var item:ItemVO = new ItemVO( body.itemId, body.itemName, body.money );
			
			itemProxy.addItem( item );
		}
	}
}